package com.cloud.drore.eboss.operation.mapper;

import com.cloud.drore.eboos.common.base.MyMapper;
import com.cloud.drore.eboss.operation.entity.po.ProductToDistributorSettingPo;
import com.cloud.drore.eboss.operation.mapper.provider.ProductToDistributorSettingProvider;
import com.cloud.drore.eboss.supplier.entity.DistributorProductAssociation;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/2/5 17:53 <br>
 * @Author: <a href="1451173193@qq.com">杨亮</a>
 */
public interface ProductToDistributorSettingMapper extends MyMapper<DistributorProductAssociation> {
    //获取分销商列表（门票-设置分销商-保存（删除关联））
    @Delete("delete from eboos_distributor_product_association where id in (${deleteSql})")
    Integer deleteRelationList(@Param("deleteSql") String deleteSql);
    //门票-设置分销商-保存（更新关联）
    @SelectProvider(type = ProductToDistributorSettingProvider.class, method = "getUpdateProductRelationSql")
    Integer updateProductRelation(ProductToDistributorSettingPo po);

}
